package com.github.beihaifeiwu.myspring.data.repo.mybatis;

import com.baomidou.mybatisplus.annotations.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 用户表
 */
@EqualsAndHashCode(of = { "name", "age" }, callSuper = true)
@Data
public class User extends SuperEntity<User> {

    private String name;

    private Integer age;

    @TableField("test_type")
    private Integer testType;

    @TableField("test_date")
    private Date testDate;

    private Long role;
    private String phone;

    public User() {
    }

    public User(Long id, String name, Integer age, Integer testType) {
        this.setId(id);
        this.name = name;
        this.age = age;
        this.testType = testType;
    }

    public User(String name, Integer age, Integer testType) {
        this.name = name;
        this.age = age;
        this.testType = testType;
    }
}